#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main() {
	char team[51];
	int a1=0, a2=0, b1=0, b2=0, c1=0, c2=0, d1=0, d2=0, e=0;

	if (scanf("%50s", team) != 1) {
		printf("输入错误\n");
		return 1;
	}
	while (getchar() != '\n');
	printf("你输入的字符串是: %s\n", team);

	for (int i=0; i <=strlen(team); i++)
	{
		if(team[i]=='u')
		{
			a1++;
		}
		else if(team[i] == 'U')
		{
			
				a2++;
		}
		else if(team[i]=='p')
		{
			b1++;
		}
		else if(team[i]=='P')
		{
			b2++;
		}
		else if (team[i] == 'r')
		{
			c1++;
		}
		else if (team[i] == 'R')
		{
			c2++;
		}
		else if (team[i] == 'e')
		{
			d1++;
		}
		else if (team[i] == 'E')
		{
			d2++;
		}
		
	}
	char* ptr = team;
	while ((ptr = strstr(ptr, "UPRE")) != NULL) {
		e++;
		ptr++;
	}
	printf("U:有%d个小写，有%d个大写 ",a1,a2);
	printf("P:有%d个小写，有%d个大写 ", b1, b2);
	printf("R:有%d个小写，有%d个大写", c1, c2);
	printf("E:有%d个小写，有%d个大写", d1, d2);
	printf("UPRE:有%d个",e);
	return 0;
}